﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleUI
{
    public class Card
    {
        /// <summary>
        /// 卡片  1 - K
        /// </summary>
        public int Name { get; set; }

        /// <summary>
        /// 1 普通  1-k   3大王   2小王
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        ///  红0 方片1 花2 黑3
        /// </summary>
        public int Color { get; set; }
        public override string ToString()
        {
            var retval = "";

            if (Type == 2)
            {
                retval = "小王";
            }
            else if (Type == 3)
            {
                retval = "大王";
            }
            else
            {
                switch (Color)
                {
                    case 0:
                        retval = "红桃";
                        break;
                    case 1:
                        retval = "方片";
                        break;
                    case 2:
                        retval = "梅花";
                        break;
                    case 3:
                        retval = "黑桃";
                        break;
                    default:
                        break;
                }
                //1 A 11 J  12 Q  13 K
                if (Name == 1)
                {
                    retval += "A";
                }
                else if (Name == 11)
                {
                    retval += "J";
                }
                else if (Name == 12)
                {
                    retval += "Q";
                }
                else if (Name == 13)
                {
                    retval += "K";
                }
                else
                {
                    retval += Name.ToString();
                }
            }
            return retval;
        }
    }
}
